package cn.flying.cloud.message.api.feign;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.flying.cloud.message.api.MessageServiceApi;
import cn.flying.cloud.message.core.service.MessageService;
import cn.flying.cloud.message.model.MessageRequest;

/**
 * 消息服务接口
 *
 * @author: admin
 * @date: 2025年04月09日 09:58
 * @version: 1.0
 */
@RestController
@RequestMapping("/message/api")
public class MessageApiController implements MessageServiceApi {

    @Resource
    private MessageService messageService;

    /**
     * 发送短信
     *
     * @param request
     * @return
     */
    @Override
    public void sendSms(MessageRequest request) {
        messageService.sendSms(request);
    }

    /**
     * 简单文本邮件
     *
     * @param request
     */
    @Override
    public void sendSimpleMail(MessageRequest request) {
        messageService.sendSimpleMail(request);
    }

    /**
     * HTML邮件
     *
     * @param request
     */
    @Override
    public void sendHtmlMail(MessageRequest request) {
        messageService.sendHtmlMail(request);
    }
}
